TECCountAvailableSniffers
Counts and returns the number of sniffers available in all installed plug-ins.
pascal OSStatus TECCountAvailableSniffers ( ItemCount *numberOfEncodings);
numberOfEncodings
- A pointer to a value of type
ItemCount
. On output, this value indicates the number of sniffers in all installed plug-ins.- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than
noErr
, then one of the text conversion plug-ins encountered an error when polled for available sniffers.DISCUSSION
TheTECCountAvailableSniffers
function counts and returns the number of sniffers that you can use to perform a determination of the current text encoding. This number tells you what size array you must allocate in a parameter of the functionTECGetAvailableSniffers
(page 84).
TECCountAvailableSniffers
counts each instance of the same sniffer. That is, if different conversion plug-ins support a sniffer for the same text encoding, this function includes each instance of the sniffer in its sum. Consequently, one type of sniffer may be counted more than once. However, since theTECGetAvailableSniffers
function does not return duplicate text encoding specifications,TECCountAvailableSniffers
may return a number greater than the number of array elements required.